package com.gec.entity;

public class Buycar {
	private int id;
	private int mem_id;
	private int good_id;
	private int qty;

	// 扩充外键对象

	private String goodImg;
	private String goodName;
	private float goodPrice;	
	private float goodCurprice;
	
	public float getGoodCurprice() {
		return goodCurprice;
	}

	public void setGoodCurprice(float goodCurprice) {
		this.goodCurprice = goodCurprice;
	}
	
	// 小计
	public float getSum() {
		return this.goodPrice * this.qty;
	}

	public String getGoodImg() {
		return goodImg;
	}

	public void setGoodImg(String goodImg) {
		this.goodImg = goodImg;
	}

	public String getGoodName() {
		return goodName;
	}

	public void setGoodName(String goodName) {
		this.goodName = goodName;
	}

	public float getGoodPrice() {
		return goodPrice;
	}

	public void setGoodPrice(float goodPrice) {
		this.goodPrice = goodPrice;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getMem_id() {
		return mem_id;
	}

	public void setMem_id(int mem_id) {
		this.mem_id = mem_id;
	}

	public int getGood_id() {
		return good_id;
	}

	public void setGood_id(int good_id) {
		this.good_id = good_id;
	}

	public int getQty() {
		return qty;
	}

	public void setQty(int qty) {
		this.qty = qty;
	}

	@Override
	public String toString() {
		return "Buycar [id=" + id + ", mem_id=" + mem_id + ", good_id=" + good_id + ", qty=" + qty + "]";
	}

	public float getDiscount() {
		return this.qty * this.goodCurprice;
	}

}
